Console: remove deprecated finish_console_register
authorAmbroise Vincent <[email protected]>
Wed, 27 Mar 2019 15:45:35 +0000 (15:45 +0000)
committerAmbroise Vincent <[email protected]>
Wed, 3 Apr 2019 13:55:18 +0000 (14:55 +0100)
The old version of the macro is deprecated.

Commit cc5859ca19ff ("Multi-console: Deprecate the
`finish_console_register` macro") provides more details.

Change-Id: I3d1cdf6496db7d8e6cfbb5804f508ff46ae7e67e
Signed-off-by: Ambroise Vincent <[email protected]>
15 files changed:
drivers/arm/pl011/aarch32/pl011_console.S
drivers/arm/pl011/aarch64/pl011_console.S
drivers/cadence/uart/aarch64/cdns_console.S
drivers/console/aarch64/skeleton_console.S
drivers/coreboot/cbmem_console/aarch64/cbmem_console.S
drivers/marvell/uart/a3700_console.S
drivers/meson/console/aarch64/meson_console.S
drivers/st/uart/aarch32/stm32_console.S
drivers/ti/uart/aarch64/16550_console.S
include/arch/aarch32/console_macros.S
include/arch/aarch64/console_macros.S
plat/imx/common/aarch32/imx_uart_console.S
plat/imx/common/imx_uart_console.S
plat/imx/common/lpuart_console.S
plat/layerscape/common/aarch64/ls_console.S

index e9f95f2899f5981350f4f7209216e3cba1ae9978..a85a937401f100f4c9b621dced32bf83f78b81e2 100644 (file)
@@ -6,7 +6,6 @@
 #include <arch.h>
 #include <asm_macros.S>
 #include <assert_macros.S>
-#define USE_FINISH_CONSOLE_REG_2
 #include <console_macros.S>
 #include <drivers/arm/pl011.h>
 
index aaa39c11c6cbe715cdebce0eda4177bc7d0423dd..52f250364d4c07ad40582b4b342c6a2f72d67524 100644 (file)
@@ -6,7 +6,6 @@
 #include <arch.h>
 #include <asm_macros.S>
 #include <assert_macros.S>
-#define USE_FINISH_CONSOLE_REG_2
 #include <console_macros.S>
 #include <drivers/arm/pl011.h>
 
index 43d08f45452b2f7b1346f6d78241ccd701e6dbd6..8b383799777a548c73a1b5564316a8e13d1a50a5 100644 (file)
@@ -6,7 +6,6 @@
 #include <arch.h>
 #include <asm_macros.S>
 #include <assert_macros.S>
-#define USE_FINISH_CONSOLE_REG_2
 #include <console_macros.S>
 #include <drivers/cadence/cdns_uart.h>
 
index 3993eef99d1dcfd91ba5ef55e89dc1b1b46719d5..1ba21967822d7e4d8ae287b9354d3be1dc228a0e 100644 (file)
@@ -4,7 +4,6 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 #include <asm_macros.S>
-#define USE_FINISH_CONSOLE_REG_2
 #include <console_macros.S>
 
        /*
index 4c14b69c5162ad4a7fff5ab5e7bbd1abc2dd9cec..fd04c2e7e257f3d9c92fe249a478ea241fbb0a8a 100644 (file)
@@ -5,7 +5,6 @@
  */
 
 #include <asm_macros.S>
-#define USE_FINISH_CONSOLE_REG_2
 #include <console_macros.S>
 #include <drivers/coreboot/cbmem_console.h>
 
index cc3855dbb796a51ae5083619eec5d000694e0b2d..da1ce351c8c80c321d5debf69c74c6f01447d428 100644 (file)
@@ -7,7 +7,6 @@
 
 #include <arch.h>
 #include <asm_macros.S>
-#define USE_FINISH_CONSOLE_REG_2
 #include <console_macros.S>
 #include <drivers/marvell/uart/a3700_console.h>
 
index 5cf9b8878584570938c3b4a5e38491e7f33187c2..22d07733282e8e2e66194fe55c193bc2fcd79463 100644 (file)
@@ -6,7 +6,6 @@
 
 #include <asm_macros.S>
 #include <assert_macros.S>
-#define USE_FINISH_CONSOLE_REG_2
 #include <console_macros.S>
 #include <drivers/meson/meson_console.h>
 
index 4d00e68ab3c04a77227307bc30e4ad30d7d28ca7..39e449b29d5558df057534f11383d2ba7a673cb9 100644 (file)
@@ -5,7 +5,6 @@
  */
 #include <asm_macros.S>
 #include <assert_macros.S>
-#define USE_FINISH_CONSOLE_REG_2
 #include <console_macros.S>
 #include <drivers/st/stm32_console.h>
 #include <drivers/st/stm32_uart_regs.h>
index 3180593ad96234c00039e56c5d59a63be266d127..55db5031e539e70fe53dd2b3fbbb078dba7d75b6 100644 (file)
@@ -7,7 +7,6 @@
 #include <arch.h>
 #include <asm_macros.S>
 #include <assert_macros.S>
-#define USE_FINISH_CONSOLE_REG_2
 #include <console_macros.S>
 #include <drivers/ti/uart/uart_16550.h>
 
index ed5088d5a2b4538af190054d8749db652367917b..070be849de95fa8111685037ae0bb7cfd9bbc987 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
  * with a tail call that will include return to the caller.
  * REQUIRES console_t pointer in x0 and a valid return address in x30.
  */
-/*
- * The USE_FINISH_CONSOLE_REG_2 guard is introduced to allow selection between
- * the 2 variants of the finish_console_register macro and will be removed
- * once the deprecated variant is removed.
- */
-#ifndef USE_FINISH_CONSOLE_REG_2
-#if !ERROR_DEPRECATED
-       /* This version of the macro is deprecated. Use the new version */
-       .macro  finish_console_register _driver
-       /*
-        * Add these weak definitions so we will automatically write a 0 if the
-        * function doesn't exist. I'd rather use .ifdef but that only works if
-        * the function was defined (not just declared .global) above this point
-        * in the file, which we can't guarantee.
-        */
-       .weak console_\_driver\()_putc
-       .weak console_\_driver\()_getc
-       .weak console_\_driver\()_flush
-
-       /* Don't use adrp on weak funcs! See GNU ld bugzilla issue 22589. */
-       ldr     r1, =console_\_driver\()_putc
-       str     r1, [r0, #CONSOLE_T_PUTC]
-       ldr     r1, =console_\_driver\()_getc
-       str     r1, [r0, #CONSOLE_T_GETC]
-       ldr     r1, =console_\_driver\()_flush
-       str     r1, [r0, #CONSOLE_T_FLUSH]
-       mov     r1, #(CONSOLE_FLAG_BOOT | CONSOLE_FLAG_CRASH)
-       str     r1, [r0, #CONSOLE_T_FLAGS]
-       b       console_register
-       .endm
-#endif /* ERROR_DEPRECATED */
-#else /* USE_FINISH_CONSOLE_REG_2 */
-       /* The new version of the macro not using weak references */
        .macro  finish_console_register _driver, putc=0, getc=0, flush=0
        /*
         * If any of the callback is not specified or set as 0, then the
@@ -80,5 +47,5 @@
        str     r1, [r0, #CONSOLE_T_FLAGS]
        b       console_register
        .endm
-#endif /* USE_FINISH_CONSOLE_REG_2 */
+
 #endif /* CONSOLE_MACROS_S */
index 90ef4204877f81a726474f431b9bd120391257a1..3285d855afc7e5f5ab6bd5b4585d1e6b57d5a246 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
  * with a tail call that will include return to the caller.
  * REQUIRES console_t pointer in x0 and a valid return address in x30.
  */
-/*
- * The USE_FINISH_CONSOLE_REG_2 guard is introduced to allow selection between
- * the 2 variants of the finish_console_register macro and will be removed
- * once the deprecated variant is removed.
- */
-#ifndef USE_FINISH_CONSOLE_REG_2
-#if !ERROR_DEPRECATED
-       /* This version of the macro is deprecated. Use the new version */
-       .macro  finish_console_register _driver
-       /*
-        * Add these weak definitions so we will automatically write a 0 if the
-        * function doesn't exist. I'd rather use .ifdef but that only works if
-        * the function was defined (not just declared .global) above this point
-        * in the file, which we can't guarantee.
-        */
-       .weak console_\_driver\()_putc
-       .weak console_\_driver\()_getc
-       .weak console_\_driver\()_flush
-
-       /* Don't use adrp on weak funcs! See GNU ld bugzilla issue 22589. */
-       ldr     x1, =console_\_driver\()_putc
-       str     x1, [x0, #CONSOLE_T_PUTC]
-       ldr     x1, =console_\_driver\()_getc
-       str     x1, [x0, #CONSOLE_T_GETC]
-       ldr     x1, =console_\_driver\()_flush
-       str     x1, [x0, #CONSOLE_T_FLUSH]
-       mov     x1, #(CONSOLE_FLAG_BOOT | CONSOLE_FLAG_CRASH)
-       str     x1, [x0, #CONSOLE_T_FLAGS]
-       b       console_register
-       .endm
-#endif /* ERROR_DEPRECATED */
-#else /* USE_FINISH_CONSOLE_REG_2 */
-       /* The new version of the macro not using weak references */
        .macro  finish_console_register _driver, putc=0, getc=0, flush=0
        /*
         * If any of the callback is not specified or set as 0, then the
@@ -83,6 +50,5 @@
        str     x1, [x0, #CONSOLE_T_FLAGS]
        b       console_register
        .endm
-#endif /* USE_FINISH_CONSOLE_REG_2 */
 
 #endif /* CONSOLE_MACROS_S */
index e526d9cb27b2a1b916357b86ba64ec8f325539d9..1c729b1d7e701309d88c22ca2b5fa1ad3fc4279a 100644 (file)
@@ -6,7 +6,6 @@
 
 #include <arch.h>
 #include <asm_macros.S>
-#define USE_FINISH_CONSOLE_REG_2
 #include <console_macros.S>
 #include <assert_macros.S>
 #include "imx_uart.h"
index 03ec3133e304af03a672153de817da450ea1b24c..3bdeea26c44eb23f2d3fe8ca55de67a6515776c6 100644 (file)
@@ -6,7 +6,6 @@
 
 #include <arch.h>
 #include <asm_macros.S>
-#define USE_FINISH_CONSOLE_REG_2
 #include <console_macros.S>
 #include <assert_macros.S>
 #include "imx_uart.h"
index 01628680f770832e9a42f229d94e48b73e5de1ef..d8dac2ceaf0f8b36d034d544611266310ae8bc0b 100644 (file)
@@ -6,7 +6,6 @@
 
 #include <arch.h>
 #include <asm_macros.S>
-#define USE_FINISH_CONSOLE_REG_2
 #include <console_macros.S>
 #include <assert_macros.S>
 #include "imx8_lpuart.h"
index ec4390a69de1dadcb0be172df2d82fa5c68a711a..a3c270dcd4e89beaa3dca5bf856da910dc712df6 100644 (file)
@@ -6,7 +6,6 @@
 
 #include <arch.h>
 #include <asm_macros.S>
-#define USE_FINISH_CONSOLE_REG_2
 #include <console_macros.S>
 #include <assert_macros.S>
 #include "ls_16550.h"